<?php 
    if (isset($_COOKIE['userid']) && isset($_COOKIE['usermd5']))
    {
        require('config.php');
        $stmt = $connection->stmt_init();
    	$stmt->prepare("select fav_type from user_fav_lists where user_id=? order by create_time desc");
    	$stmt->bind_param("s", $_COOKIE['userid']);
    	$stmt->execute();
        $stmt->bind_result($fav_list);
        $result = "";
        while ($stmt->fetch()) 
        {
            $result = $result . $fav_list . ":;";
        }
        echo $result;
    }
    else
    {
        echo "NOUSER";
    }
?> 
